package com.yeswater.multithread.chapter1.test1_11.test5;

import java.util.concurrent.TimeUnit;

/**
 * author : yeswater
 * date : 2023/10/19
 */

public class MyThread1 extends Thread{
    @Override
    public void run() {
        super.run();
        try {
            for (int i = 0; i < 100; i++) {
                System.out.println("i=" + (i + 1));
            }
            System.out.println("run begin");
            // TimeUnit.SECONDS.sleep(200);
            Thread.sleep(200000);
            System.out.println("run end");
        } catch (InterruptedException e) {
            System.out.println(" 先停止,再遇到 sleep! 进入 catch!");
            e.printStackTrace();
        }
    }
}
